<template>
  <div class="header">
    <div class="header-left">
      <span class="iconfont">&#xe624;</span>
    </div>
    <div class="header-input">
      <span class="iconfont search-icon">&#xe632;</span>
      主题乐园
    </div>
    <router-link to="/city">
      <div class="header-right">
        {{this.city}}
        <span class="iconfont arrow-icon">&#xe64a;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/varibles.styl'
  .header
    display: flex
    height: .86rem
    line-height: .86rem
    background: $bgColor
    .header-left
      width: .64rem
      float: left
      color: #fff
      text-align: center
    .header-input
      flex:1
      height: .64rem
      line-height: .64rem
      margin-left: .2rem
      margin-top: .12rem
      background: #fff
      border-radius: .1rem
      color: #ccc
      .search-icon
        padding-left: 0.2rem
    .header-right
      width: 1.24rem
      float: right
      color: #fff
      text-align: center
      .arrow-icon
        font-size: 0.24rem
</style>
